/**
 * 应用常量
 * Created by Freeman on 2017/3/16.
 */
export const API_TOKEN = 'API_TOKEN'                    // 接口API_TOKEN
export const CHANNEL = 'channel'                        // 渠道
export const SIGN_SECURITY_KEY = 'jxwy2016'	            // 参数签名密钥
export const PARAM_SIGN_NAME = 'sign'	                // 答名参数名


// API响应码
export const HTTP_REQUEST_SUCCESS = 1000

//IM
export const IM_APPID = '1400017586'
export const IM_ACCOUNT_TYPE = '8416'
export const IM_FRIEND_DEFAULT_PAGE_SIZE = 15           // 好友列表默认每页显示的个数
export const IM_MESSAGE_DEFAULT_PAGE_SIZE = 15          // 聊天记录每页默认显示的条数

// 缓存消息类型
export const ADMIN_ACCOUNT = 'admin'                    // 管理员帐号
export const IM_LOGIN_RETRY_MAX_COUNT = 5               // 登录失败最大重试次数
export const IM_LOGIN_RETRY_TIME = 1500                 // 登录失败重试间隔时间

// 系统消息类型
export const SYS_MESSAGE_TYPE_APPLY = 1                 // 申请加入班级消息
export const SYS_MESSAGE_TYPE_AUDIT = 2                 // 班级审核通知消息
export const SYS_MESSAGE_TYPE_TRANSFER = 3              // 班级转让通知消息
export const SYS_MESSAGE_TYPE_DISSOLVE = 4              // 班级解散消息
export const SYS_MESSAGE_TYPE_DYNAMIC = 5               // 动态消息

// 动作类型
export const SYS_MESSAGE_ACTION_NORMAL = 0              // 无动作
export const SYS_MESSAGE_ACTION_LINK = 1                // 链接跳转
export const SYS_MESSAGE_ACTION_DATA = 2                // 参数

// 短信验证码
export const SMS_VERIFY_CODE_USER_REGISTER = 1          // 用户注册短信验证码
export const SMS_VERIFY_CODE_FORGET_PASSWORD = 2        // 忘记密码验证码
export const SMS_VERIFY_CODE_COUNT_DOWN = 60            // 短信验证码倒计时（单位：秒）

// 服务器公共响应码
export const RESPONSE_CODE_SUCCESS = 1000		        // 请求成功
export const RESPONSE_CODE_SER_ERROR = 1001	            // 系统错误
export const RESPONSE_CODE_PARAM_ERROR = 1002	        // 请求参数异常
export const RESPONSE_CODE_API_TOKEN_INVALID = 2001     // 无效的api_token
export const RESPONSE_CODE_SIGN_ERROR = 2003	        // å‚æ•°ç­¾åé”™è¯¯

export const USER_INFO = 'USER_INFO'                    // ç”¨æˆ·ä¿¡æ¯KEY

//æ€§åˆ«
export const GENDER_MEN = 1 //ç”·
export const GENDER_WOMEN = 2 //å¥³

// èº«ä»½
export const IDENTITY_FATHER = 1    // çˆ¸çˆ¸
export const IDENTITY_MOM = 2       // å¦ˆå¦ˆ
export const IDENTITY_GRANDPA = 3   // çˆ·çˆ·
export const IDENTITY_GRANDMA = 4   // å¥¶å¥¶
export const IDENTITY_OTHER = 5     // å…¶å®ƒ

// ç­çº§çŠ¶æ€
export const GRADE_STATUS_APPLYING = 0      // ç”³è¯·å®¡æ ¸ä¸­
export const GRADE_STATUS_JOINED = 1        // é€šè¿‡/åŠ å…¥
export const GRADE_STATUS_REJECTED = 2      // å®¡æ ¸æœªé€šè¿‡
export const GRADE_STATUS_UNJOIN = 5        // æœªåŠ å…¥
export const APPLY_STATUS = {}

// å®¡æ ¸çŠ¶æ€
export const APPLY_CHECK_STATUS_AGREE = 1   // é€šè¿‡
export const APPLY_CHECK_STATUS_REJECT = 2  // æ‹’ç»

// å¥½å‹åˆ—è¡¨æ˜¾ç¤ºçš„æœ€å¤§tagæ•°é‡
export const FRIEND_MAX_TAG_COUNT = 3

//é»˜è®¤å¤´åƒç›¸å¯¹åœ°å€
export const DEFAULT_AVATAR = ''
// é‡ç½®å¯†ç çš„keyå’Œæ‰‹æœºå·å­˜å‚¨åœ¨localStoreä¸­çš„key
export const RESET_PWD_KEY = 'RESET_PWD_KEY'
export const RESET_PWD_PHONE = 'RESET_PWD_PHONE'

//ç”¨æˆ·èº«ä»½ç±»åž‹
export const USERTYPE_LEADER_TEACHER = 1    //ç­ä¸»ä»»
export const USERTYPE_TEACHER = 2           //è€å¸ˆ
export const USERTYPE_PARENT = 3            //å®¶é•¿

// æŽˆè¯¾ç§‘ç›®ä¸Šé™
export const COURSE_SELECT_MAX_COUNT = 5

// å®Œå–„å­¦ç”Ÿä¿¡æ¯
export const STUINFO_FROM_CREATE_GRADE = 1  // åˆ›å»ºç­çº§æ—¶å®Œå–„å­¦ç”Ÿä¿¡æ¯
export const STUINFO_FROM_APPLY_GRADE = 2   // ç”³è¯·åŠ å…¥ç­çº§æ—¶å®Œå–„å­¦ç”Ÿä¿¡æ¯

//é¦–é¡µtabå®½åº¦
export const TAB_WIDTH = 460

// åŠ¨æ€ç±»åž‹
export const DYNAMIC_TYPE_ALL = 1           // æ‰€æœ‰
export const DYNAMIC_TYPE_TASK = 2          // ä½œä¸š
export const DYNAMIC_TYPE_NOTIFY = 3        // é€šçŸ¥
export const DYNAMIC_TYPE_LEAVE = 4         // è¯·å‡
export const DYNAMIC_TYPE_PERFORMANCE = 5   // æˆç»©
export const DYNAMIC_TYPE_AWARD = 6         // å¥–åŠ±
export const DYNAMIC_TYPE_CRITICISM = 7     // æ‰¹è¯„
export const DYNAMIC_TYPE_OVER_SCHOOL = 8   // æ”¾å­¦
export const DYNAMIC_TYPE_OVER_OTHER = 9    // å…¶å®ƒ

// åŠ¨æ€åˆ—è¡¨è§†å›¾ç±»åž‹
export const DYNAMIC_VIEW_TYPE_HOME = 1         // é¦–é¡µ
export const DYNAMIC_VIEW_TYPE_MY = 2           // æˆ‘å‘å¸ƒçš„
export const DYNAMIC_VIEW_TYPE_DRAFT = 3        // è‰ç¨¿ç®±
export const DYNAMIC_VIEW_TYPE_FAVORITE = 4     // æ”¶è—å¤¹
export const DYNAMIC_VIEW_TYPE_SEARCH = 5       // æœç´¢

// åŠ¨æ€ç±»åž‹ä¸Žå°å›¾æ ‡çš„å¯¹åº”å…³ç³»
export const DYNAMIC_TYPE_SMALL_ICON_MAP = {}


//星期
export const WEEK = [
  '星期日',
  '星期一',
  '星期二',
  '星期三',
  '星期四',
  '星期五',
  '星期六'
]

//存储localStorage发布类型
export const DYNAMIC_TYPES = 'DYNAMIC_TYPES'

// 动态状态
export const DYNAMIC_STATUS_PUBLISHED = 1   // 已发布
export const DYNAMIC_STATUS_DRAFT = 2       // 草稿

//动态每页显示条数
export const DEFAULT_DYNAMIC_PAGE_SIZE = 15

//上传图片类型
export const UP_PICTURE = 1

// 班级列表逻辑处理常量
export const GRADE_MEMBER_LIST_OPER_TRANSFER = 1     // 转让班级
export const GRADE_MEMBER_LIST_OPER_BROWSE = 2       // 浏览班级成员
export const GRADE_MEMBER_LIST_SELECT_FRIEND = 3     // 选择好友聊天

// 对话框
export const DIALOG_BTN_CONFIRM = '确认'
export const DIALOG_BTN_CANCEL = '取消'

export const TO_GRADE_DETAIL_FROM_APPLY_COMPLETE = 1     // 申请加入班级完成后，进入班级详情界面
export const TO_GRADE_DETAIL_FROM_CREATE_COMPLETE = 2    // 创建班级完成后，进入班级详情界面

// 用户偏好设置
export const SETTING_SHOW_PHONE = "showPhone"
export const SETTING_SHOW_CLASS = "showClass"

// 进入班级审核界面
export const APPLY_FROM_SYSTEM_MESSAGE = 1

// -------------------事件------------------
export const EVENT_INIT_CACHE_COMPLETE = 'EVENT_INIT_CACHE_COMPLETE'    // 初始化缓存完成
export const EVENT_LOGIN_SUCCESS = 'EVENT_LOGIN_SUCCESS'                // 用户登录成功事件
export const EVENT_LOGOUT_SUCCESS = 'EVENT_LOGOUT_SUCCESS'              // 用户退出登录成功事件
export const EVENT_IM_LOGIN_SUCCESS = 'EVENT_IM_LOGIN_SUCCESS'          // IM登录成功事件
export const EVENT_IM_LOGIN_ERROR = 'EVENT_IM_LOGIN_ERROR'              // IM登录失败事件

export const EVENT_IMG_SHOW = 'EVENT_IMG_SHOW'                          // 图片预览事件
export const EVENT_CHANGE_CHECKED = 'EVENT_CHANGE_CHECKED'              // 复选框选择事件
export const EVENT_REFRESH = 'EVENT_REFRESH'                            // 更新动态事件
export const EVENT_CHANGE_CLASS = 'EVENT_CHANGE_CLASS'                  // 切换班级事件
export const EVENT_DEL_UPLOAD_IMG = 'EVENT_DEL_UPLOAD_IMG'              // 删除上传图片事件
export const EVENT_ADD_NEW_DYNAMIC = 'EVENT_ADD_NEW_DYNAMIC'            // 添加一条新的动态
export const EVENT_APPLY_REJECTED = 'EVENT_APPLY_REJECTED'              // 申请班级被拒绝

export const EVENT_SCHEDULE_EDIT_COURSE = 'EVENT_SCHEDULE_EDIT_COURSE'  // 编辑课程表

// -------------存储在localStorage中的Key---------
export const CACHE_LAST_USE_LOGIN_PHONE = 'CACHE_LAST_USE_LOGIN_PHONE'
export const CACHE_LAST_SELECT_CLASS_ID = 'CACHE_LAST_SELECT_CLASS_ID'    // 首页最后一次选择的班级

export const HAS_FOOTER_HEIGHT = 140;  //包含动态的滚动区域
export const NONE_FOOTER_HEIGHT = 90;  //不包含动态的滚动区域
export const SEARCH_HEIGHT = 44;       //搜索页面

// header和footer的高度
export const HEADER_HEIGHT = 46
export const FOOTER_HEIGHT = 51

export const ENV_PRODUCTION = "production"  // 生产环境

export const ROUTE_FROM_SCHEDULE = 'schedule'
